亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fpparchlib.c

?? vxworks的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* fppArchLib.c - Hitachi SH floating-point coprocessor support library *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01n,05dec02,hk   restore PC and PR in case of fppExcHandle() error. (SPR#83145)01m,10dec01,zl   removed local typedef of UINT64.01l,11sep01,zl   replaced CPU conditionals with _WRS_HW_FP_SUPPORT.01k,01dec00,zl   endian order in fppExcHandle() to comply with updated uss_xxx.01j,12jul00,hk   added fppExcHandle() and fppExcFixup().01i,28jun00,zl   added fpscrInitValue for SH770001h,05jun00,zl   changed default FPSCR value to support denormalized numbers                 and use rounding to nearest policy.01g,20mar00,zl   added extended floating point registers to the FP context.		 removed fppReset.01f,11aug,99zl   made __fpscr_values external (from gcclib.a) 01e,08jun,99zl   hitachi SH4 architecture port, provided by                   Highlander Engineering. Initialize FPSCR.		  Updated description to be more generic.01d,08mar99,hk   added #if for FPU-less CPU types.01c,15jun98,hk   implemented fppProbe().01b,11may98,hk   paid some efforts for faster operation.01a,26nov97,hms  written based on MC68K's fppArchLib.c*//*DESCRIPTIONThis library provides the low-level interface to Hitachi SH on-chipfloating point facilities.The routines fppTaskRegsSet() and fppTaskRegsGet() inspect and setfloating-point registers on a per task basis.  The routine fppProbe()checks for the presence of the floating-point processor.With the exception of fppProbe(), the higher level facilities indbgLib and usrLib should be used instead of these routines. See fppLib for architecture independent portion.SEE ALSO: fppALib, intConnect(), Hitachi SH Hardware Manuals*/#include "vxWorks.h"#include "objLib.h"#include "taskLib.h"#include "taskArchLib.h"#include "memLib.h"#include "string.h"#include "iv.h"#include "intLib.h"#include "regs.h"#include "fppLib.h"#if (_BYTE_ORDER == _LITTLE_ENDIAN)# define  HREG			1# define  LREG			0#else# define  HREG			0# define  LREG			1#endif#if (CPU==SH7750)#undef FPP_DEBUG#ifdef FPP_DEBUG#include "fioLib.h"				/* to use printExc() */#endif /*FPP_DEBUG*/typedef union    {    UINT64 u64;    UINT32 u32[2];    } UNION64;IMPORT UINT64 uss_dpadd (UINT64 d1, UINT64 d2);		/* d1 + d2 */IMPORT UINT32 uss_fpadd (UINT32 f1, UINT32 f2);		/* f1 + f2 */IMPORT UINT64 uss_dpsub (UINT64 d1, UINT64 d2);		/* d1 - d2 */IMPORT UINT32 uss_fpsub (UINT32 f1, UINT32 f2);		/* f1 - f2 */IMPORT UINT64 uss_dpmul (UINT64 d1, UINT64 d2);		/* d1 * d2 */IMPORT UINT32 uss_fpmul (UINT32 f1, UINT32 f2);		/* f1 * f2 */IMPORT UINT64 uss_dpdiv (UINT64 d1, UINT64 d2);		/* d1 / d2 */IMPORT UINT32 uss_fpdiv (UINT32 f1, UINT32 f2);		/* f1 / f2 */IMPORT UINT64 uss_dpsqrt (UINT64 d1);			/* d1 ^ 0.5 */IMPORT UINT32 uss_fpsqrt (UINT32 f1);			/* f1 ^ 0.5 */IMPORT UINT64 uss_fptodp (UINT32 f1);			/* (double)f1 */IMPORT UINT32 uss_dptofp (UINT64 d1);			/* (float)d1  */LOCAL INSTR *fppExcFixup (ESFSH *pEsf, REG_SET *pRegs);#endif /* CPU==SH7750 *//* globals */REG_INDEX fpRegName [] =    {#ifdef	_WRS_HW_FP_SUPPORT    {"fr0",  FPX_OFFSET(0)},    {"fr1",  FPX_OFFSET(1)},    {"fr2",  FPX_OFFSET(2)},    {"fr3",  FPX_OFFSET(3)},    {"fr4",  FPX_OFFSET(4)},    {"fr5",  FPX_OFFSET(5)},    {"fr6",  FPX_OFFSET(6)},    {"fr7",  FPX_OFFSET(7)},    {"fr8",  FPX_OFFSET(8)},    {"fr9",  FPX_OFFSET(9)},    {"fr10", FPX_OFFSET(10)},    {"fr11", FPX_OFFSET(11)},    {"fr12", FPX_OFFSET(12)},    {"fr13", FPX_OFFSET(13)},    {"fr14", FPX_OFFSET(14)},    {"fr15", FPX_OFFSET(15)},#if (FP_NUM_DREGS == 32)    {"xf0",  FPX_OFFSET(16)},    {"xf1",  FPX_OFFSET(17)},    {"xf2",  FPX_OFFSET(18)},    {"xf3",  FPX_OFFSET(19)},    {"xf4",  FPX_OFFSET(20)},    {"xf5",  FPX_OFFSET(21)},    {"xf6",  FPX_OFFSET(22)},    {"xf7",  FPX_OFFSET(23)},    {"xf8",  FPX_OFFSET(24)},    {"xf9",  FPX_OFFSET(25)},    {"xf10", FPX_OFFSET(26)},    {"xf11", FPX_OFFSET(27)},    {"xf12", FPX_OFFSET(28)},    {"xf13", FPX_OFFSET(29)},    {"xf14", FPX_OFFSET(30)},    {"xf15", FPX_OFFSET(31)},#endif#endif    {NULL,   0},    };REG_INDEX fpCtlRegName [] =    {#ifdef	_WRS_HW_FP_SUPPORT    {"fpul",  FPUL},    {"fpscr", FPSCR},#endif    {NULL, 0},    };#if (CPU==SH7750)IMPORT UINT32 __fpscr_values[2];	/* compiler generated code relies                                            on this to switch between single					   precision and double precision.					   It is in libgcc.a */#endif#ifdef	_WRS_HW_FP_SUPPORTUINT32 fpscrInitValue = FPSCR_INIT;	/* default FPSCR value; can be changed					   at startup if different value is 					   needed */#endif/* locals */#ifdef	_WRS_HW_FP_SUPPORTLOCAL FP_CONTEXT fppInitContext;	/* initialized to initial fp context */#endif/********************************************************************************* fppArchInit - initialize floating-point coprocessor support** This routine must be called before using the floating-point coprocessor.* It is typically called from fppInit().** NOMANUAL*/void fppArchInit (void)    {    fppCreateHookRtn = (FUNCPTR)NULL;#ifdef	_WRS_HW_FP_SUPPORT    bfill ((char *) &fppInitContext, sizeof (FP_CONTEXT),     	    0xff); 					/* fill with NaN */    fppInitContext.fpul = 0;    fppInitContext.fpscr = fpscrInitValue;    fppRestore (&fppInitContext);#if (CPU==SH7750)    __fpscr_values[0] = fpscrInitValue & ~0x80000;	/* clear FPSCR[PR] */    __fpscr_values[1] = fpscrInitValue;#endif#endif    }/********************************************************************************* fppArchTaskCreateInit - initialize floating-point coprocessor support for task** NOMANUAL*/void fppArchTaskCreateInit    (    FP_CONTEXT *pFpContext		/* pointer to FP_CONTEXT */    )    {#ifdef	_WRS_HW_FP_SUPPORT    /* create NULL frame as initial frame */    bcopy ((const char *) &fppInitContext, (char *)pFpContext,	   sizeof (FP_CONTEXT));#endif    }#ifdef	_WRS_HW_FP_SUPPORT/******************************************************************************** fppRegsToCtx - convert FPREG_SET to FP_CONTEXT.*/ void fppRegsToCtx    (    FPREG_SET *  pFpRegSet,		/* input -  fpp reg set */    FP_CONTEXT * pFpContext		/* output - fpp context */    )    {#if 0    *pFpContext = *pFpRegSet;#else    int ix;    /* normal/idle state */    for (ix = 0; ix < FP_NUM_DREGS; ix++)        pFpContext->fpx[ix] = pFpRegSet->fpx [ix];    pFpContext->fpul  = pFpRegSet->fpul;    pFpContext->fpscr = pFpRegSet->fpscr;#endif    }/******************************************************************************** fppCtxToRegs - convert FP_CONTEXT to FPREG_SET.*/ void fppCtxToRegs    (    FP_CONTEXT * pFpContext,		/* input -  fpp context */    FPREG_SET *  pFpRegSet		/* output - fpp register set */    )    {#if 0    *pFpRegSet = *pFpContext;#else    int ix;    /* normal/idle state */    for (ix = 0; ix < FP_NUM_DREGS; ix++)        pFpRegSet->fpx[ix] = pFpContext->fpx[ix];    pFpRegSet->fpul  = pFpContext->fpul;    pFpRegSet->fpscr = pFpContext->fpscr;#endif    }#endif /* _WRS_HW_FP_SUPPORT *//********************************************************************************* fppTaskRegsGet - get the floating-point registers from a task TCB** This routine copies the floating-point registers of a task* (PCR, PSR, and PIAR) to the locations whose pointers are passed as* parameters.  The floating-point registers are copied in* an array containing the 8 registers.** NOTE* This routine only works well if <task> is not the calling task.* If a task tries to discover its own registers, the values will be stale* (i.e., leftover from the last task switch).** RETURNS: OK, or ERROR if there is no floating-point* support or there is an invalid state.** SEE ALSO: fppTaskRegsSet()*/STATUS fppTaskRegsGet    (    int task,           	/* task to get info about */    FPREG_SET *pFpRegSet	/* pointer to floating-point register set */    )    {#ifdef	_WRS_HW_FP_SUPPORT    FAST FP_CONTEXT *pFpContext;    FAST WIND_TCB *pTcb = taskTcb (task);    if (pTcb == NULL)	return (ERROR);    pFpContext = pTcb->pFpContext;    if (pFpContext == (FP_CONTEXT *)NULL)	return (ERROR);			/* no coprocessor support */    fppCtxToRegs (pFpContext, pFpRegSet);    return (OK);#else    return (ERROR);#endif    }/********************************************************************************* fppTaskRegsSet - set the floating-point registers of a task** This routine loads the specified values into the specified task TCB.* The 8 registers f0-f7 are copied to the array <fpregs>.** RETURNS: OK, or ERROR if there is no floating-point* support or there is an invalid state.** SEE ALSO: fppTaskRegsGet()*/STATUS fppTaskRegsSet    (    int task,           	/* task whose registers are to be set */    FPREG_SET *pFpRegSet	/* pointer to floating-point register set */    )    {#ifdef	_WRS_HW_FP_SUPPORT    FAST WIND_TCB *pTcb = taskTcb (task);    FAST FP_CONTEXT *pFpContext;    if (pTcb == NULL)	return (ERROR);    pFpContext = pTcb->pFpContext;    if (pFpContext == (FP_CONTEXT *)NULL)	return (ERROR);			/* no coprocessor support, PUT ERRNO */    fppRegsToCtx (pFpRegSet, pFpContext);    return (OK);#else    return (ERROR);#endif    }/********************************************************************************* fppProbe - probe for the presence of a floating-point coprocessor** This routine determines whether there is an SH7718(SH3e) on-chip* floating-point coprocessor in the system.** IMPLEMENTATION* This routine sets the illegal coprocessor opcode trap vector and executes* a coprocessor instruction.  If the instruction causes an exception,* fppProbe() will return ERROR.  Note that this routine saves and restores* the illegal coprocessor opcode trap vector that was there prior to this* call.** The probe is only performed the first time this routine is called.* The result is stored in a static and returned on subsequent* calls without actually probing.** RETURNS:* OK if the floating-point coprocessor is present, otherwise ERROR.*/STATUS fppProbe (void)    {#ifdef	_WRS_HW_FP_SUPPORT    static int fppProbed = -2;		/* -2 = not done, -1 = ERROR, 0 = OK */    FUNCPTR oldVec;    if (fppProbed == -2)	{	/* save error vector */	oldVec = intVecGet ((FUNCPTR *)INUM_TO_IVEC(INUM_ILLEGAL_INST_GENERAL));	/* replace error vec */	intVecSet ((FUNCPTR *)INUM_TO_IVEC(INUM_ILLEGAL_INST_GENERAL),		(FUNCPTR) fppProbeTrap);	fppProbed = fppProbeSup ();     /* execute coprocessor instruction */	/* replace old err vec*/	intVecSet ((FUNCPTR *)INUM_TO_IVEC(INUM_ILLEGAL_INST_GENERAL),		(FUNCPTR) oldVec);	}    return (fppProbed);#else    return (ERROR);#endif    }#if (CPU==SH7750)/******************************************************************************** fppExcHandle - FPU error exception handler for IEEE754 denormalized number** This routine handles FPU error exception traps caused by inputting IEEE754* denormalized numbers to a specific set of SH7750 FPU instructions.  The goal* is to support denormalized number computation on SH7750, by emulating those* FPU instructions with integer arithmetics.  It first disassembles the FPU* instruction which got the exception, and it picks up the related FPU* registers(s) using fppRegGet().  The actual arithmetic computation is done* by the USS GOFAST FP emulation library, and the result is set to a relevant* FPU register by fppRegSet().  The following FPU instructions are emulated:**	----------------------*		single	double*	----------------------*	fadd	  o	  o*	fsub	  o	  o*	fmul	  o	  o*	fdiv	  o	  o*	fmac	  o	 n/a*	fsqrt	  o	  o*	fcnvsd	 n/a	  o*	fcnvds	 n/a	  o*	----------------------** RETURNS: OK if FP emulation is successful, ERROR otherwise.** NOMANUAL*/STATUS fppExcHandle    (    ESFSH   *pEsf,	/* pointer to exception stack frame */    REG_SET *pRegs	/* pointer to register info on stack */    )    {    INSTR *pcSave = pEsf->pc;	/* save PC before fppExcFixup() call */    INSTR *prSave = pRegs->pr;	/* save PR before fppExcFixup() call */    UINT32 fpscr = pEsf->info;    INSTR *pFpeInsn = fppExcFixup (pEsf, pRegs);    INSTR  insn;    if (pFpeInsn != NULL)	insn = *pFpeInsn;    else	goto FpError;    switch (insn & FPE_MASK_2REG)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩成人免费在线| 欧美视频一区二区| 色悠悠久久综合| 日韩精品中午字幕| 亚洲永久免费视频| 国产成人在线电影| 欧美美女网站色| 亚洲免费高清视频在线| 国产一区二三区| 欧美一区国产二区| 亚洲主播在线播放| 99久久99久久综合| 国产精品色在线| 激情五月婷婷综合| 日韩精品一区二区三区老鸭窝| 亚洲图片欧美一区| 色欧美88888久久久久久影院| 欧美高清在线精品一区| 蜜桃av一区二区| 69堂成人精品免费视频| 亚洲一区二区三区四区中文字幕| 99精品视频一区二区| 久久久久久久久99精品| 极品美女销魂一区二区三区| 欧美一区二区精美| 蜜臀久久99精品久久久久久9| 欧美日韩在线不卡| 五月天视频一区| 欧美电影在线免费观看| 午夜视频一区在线观看| 欧美日韩三级在线| 日韩精品乱码免费| 日韩亚洲欧美高清| 美女视频免费一区| 日韩美女主播在线视频一区二区三区| 蜜桃av噜噜一区| 久久综合九色综合欧美亚洲| 国产综合一区二区| 欧美经典一区二区三区| 成人激情电影免费在线观看| 国产精品女主播av| 91麻豆免费观看| 亚洲国产精品久久艾草纯爱| 9191成人精品久久| 久久99蜜桃精品| 国产人成一区二区三区影院| 成人综合激情网| 一区二区三区免费在线观看| 欧美三级乱人伦电影| 免费成人美女在线观看.| 精品国产伦理网| 成人av网址在线观看| 亚洲日本电影在线| 欧美日韩国产一级| 韩国精品在线观看| 欧美激情中文不卡| 91久久奴性调教| 蜜臀va亚洲va欧美va天堂| 欧美精品一区二区三区视频| 国产91精品久久久久久久网曝门| 国产精品久久久久婷婷二区次| 欧美综合欧美视频| 麻豆精品一区二区综合av| 欧美激情一区二区三区不卡| 91极品美女在线| 狠狠色丁香久久婷婷综合_中| 国产精品久久99| 日韩一区二区免费高清| bt欧美亚洲午夜电影天堂| 性欧美疯狂xxxxbbbb| 久久久91精品国产一区二区精品| 在线看不卡av| 国产**成人网毛片九色 | 蜜臀91精品一区二区三区| 久久久久99精品国产片| 欧美性生活影院| 粉嫩一区二区三区性色av| 亚洲二区在线视频| 国产女人18毛片水真多成人如厕| 欧美日韩高清一区二区不卡| 成人动漫在线一区| 免费成人在线观看视频| 亚洲综合在线第一页| 久久免费精品国产久精品久久久久| 91亚洲精品一区二区乱码| 精品一区二区三区av| 亚洲电影一级片| ...xxx性欧美| 国产亚洲短视频| 日韩欧美第一区| 欧美色图激情小说| www.欧美亚洲| 丁香亚洲综合激情啪啪综合| 看片的网站亚洲| 三级一区在线视频先锋| 1024国产精品| 欧美精彩视频一区二区三区| 欧美精品一区二区在线播放| 欧美一区二区在线视频| 欧美视频在线一区| 色诱视频网站一区| 不卡的av中国片| 国产成人亚洲精品狼色在线| 九色综合国产一区二区三区| 日韩制服丝袜av| 婷婷综合五月天| 亚洲国产视频一区二区| 亚洲美女一区二区三区| 日韩一区日韩二区| 国产精品灌醉下药二区| 国产精品网站在线观看| 欧美国产在线观看| 国产日产欧美一区二区三区| 国产女主播在线一区二区| 久久人人爽爽爽人久久久| 久久综合视频网| 久久精品人人爽人人爽| 久久精品亚洲乱码伦伦中文| 久久综合精品国产一区二区三区| 欧美大度的电影原声| 精品久久国产老人久久综合| 精品国产人成亚洲区| 2021中文字幕一区亚洲| 国产欧美日韩激情| 国产精品视频一二| 亚洲美女视频在线| 亚洲第一福利视频在线| 婷婷成人激情在线网| 久久成人av少妇免费| 激情深爱一区二区| 成人网男人的天堂| 欧美在线|欧美| 欧美精品久久久久久久久老牛影院| 欧美一区二区三区不卡| 日韩精品在线网站| 中文字幕第一区| 亚洲免费观看高清| 日本中文字幕一区| 国产在线播放一区| 99麻豆久久久国产精品免费优播| 色系网站成人免费| 日韩色视频在线观看| 欧美国产激情二区三区 | 久久精品国产99国产| 国产乱色国产精品免费视频| 99精品欧美一区二区三区综合在线| 欧美日韩亚洲综合一区| 精品少妇一区二区三区在线播放| 国产精品免费久久| 午夜精品久久久久久不卡8050| 久久国产精品免费| 9l国产精品久久久久麻豆| 欧美久久久久免费| 国产欧美日本一区视频| 亚洲成人动漫一区| 丁香五精品蜜臀久久久久99网站| 欧美日韩国产电影| 国产精品毛片a∨一区二区三区| 亚洲午夜在线电影| 国产激情91久久精品导航| 欧美理论片在线| 国产精品久久看| 经典三级视频一区| 欧美视频第二页| 国产精品久久久久久久岛一牛影视| 日韩电影在线免费| 色婷婷亚洲婷婷| 国产精品视频一二三| 久久99国产精品久久99| 欧美日韩在线综合| 亚洲人亚洲人成电影网站色| 狠狠色丁香九九婷婷综合五月| 欧美人伦禁忌dvd放荡欲情| 国产精品久久久久久久久动漫| 蓝色福利精品导航| 欧美日韩一区二区三区视频| 亚洲人成网站色在线观看 | 天天操天天色综合| 91老师国产黑色丝袜在线| 亚洲精品一线二线三线无人区| 午夜精品久久久| 在线精品视频小说1| 最近中文字幕一区二区三区| 国产精品一区二区在线观看不卡| 欧美丰满少妇xxxxx高潮对白| 亚洲综合男人的天堂| 91视频在线观看免费| 国产精品美女www爽爽爽| 国产精一区二区三区| 久久夜色精品一区| 韩国v欧美v日本v亚洲v| 欧美一级国产精品| 午夜日韩在线观看| 欧美日韩精品一区二区| 亚洲福中文字幕伊人影院| 欧美在线综合视频| 亚洲精品高清在线| 在线视频你懂得一区二区三区| 亚洲免费电影在线| 欧洲生活片亚洲生活在线观看|